package interfaces.superWidgets;

import gameStates.gui.GUIState;
import interfaces.AbsInterfaceElement;

import main.listeners.ListenerKeeper;

import org.fenggui.IWidget;

public abstract class InterfaceElement implements AbsInterfaceElement {
	
	protected GUIState guiState;
	
	public InterfaceElement(GUIState guiState) {
		this.guiState = guiState;
	}
	
	@Override
	public void addWidget(IWidget widget) { guiState.addWidget(widget); }
	
	@Override
	public void removeWidget(IWidget widget) { guiState.removeWidget(widget); }
	
	@Override
	public int getWidth() { return guiState.getWidth(); }
	
	@Override
	public int getHeight() { return guiState.getHeight(); }
	
	@Override
	public void addListener(ListenerKeeper keeper, Object listener) {
		guiState.addListener(keeper, listener);
	}
}